{%- extends "base.html" %}

{%- block title %}
{% trans %}User settings{% endtrans %}
{%- endblock %}

{%- block subtitle %}
{{ user }}
{%- endblock %}

{%- block content %}
<form class="form" method="post" role="form">
  {{ form.hidden_tag() }}

  {%- call macros.card(title=_("Displayed name")) %}
  {{ macros.form_field(form.displayed_name) }}
  {%- endcall %}

  {%- call macros.card(title=_("Antispam")) %}
  {%- call macros.fieldset(field=form.spam_enabled, enabled=user.spam_enabled) %}
  {{ macros.form_field(form.spam_mark_as_read) }}
  {{ macros.form_field(form.spam_threshold, step=1, max=100,
     prepend='<span class="input-group-text"><span id="spam_threshold_value"></span>&nbsp;/&nbsp;100</span>') }}
  {%- endcall %}
  {%- endcall %}

  {%- call macros.card(title=_("Auto-forward")) %}
  {%- call macros.fieldset(
      field=form.forward_enabled,
      enabled=user.forward_enabled,
      fields=[form.forward_keep, form.forward_destination]) %}
  {%- endcall %}
  {%- endcall %}

  {{ macros.form_field(form.submit) }}
</form>
{%- endblock %}
